//
//  SC_CurveChartView.h
//  SCCharts
//
//  Created by Yang on 9/2/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

@class SC_CurveIndicatorView;

@interface SC_CurveChartView : UIView {
	
	NSString *title;
	
	NSMutableArray *dataArray;
	
//	bool needShowIndicator;
//	
//	NSMutableString *indicatorValue;
//	NSMutableString *indicatorXLabel;
//	CGPoint indicatorPoint;
	
	float standardValue;
	float lowLimitedValue;
	
	bool needShowTitle;
	
	SC_CurveIndicatorView *indicatorView;

}
@property(nonatomic,retain)SC_CurveIndicatorView *indicatorView;

- (void)setTitle:(NSString *)string;
- (void)needShowTitle:(NSString *)string isShow:(bool)show;

// reset the chart margins
- (void)setTopMargin:(float )margin;
- (void)setBottomMargin:(float )margin;
- (void)setLeftMargin:(float )margin;
- (void)setRightMargin:(float )margin;

// data methods
- (void)setData:(NSArray *)array;
- (void)calculateHighValue;

// custom drawing methods
- (void)drawOutLineFrameBox:(CGContextRef)context;
- (void)drawYAxisLabels:(CGContextRef)context;
- (void)drawXAxisLabels:(CGContextRef)context;
- (void)drawCurveFill:(CGContextRef)context;
- (void)drawCurveLines:(CGContextRef )context;
//- (void)drawIndicator:(CGContextRef )context;
- (void)drawStandardLine:(CGContextRef )context;
- (void)drawLowLimitedLine:(CGContextRef )context;
- (void)drawTitleText:(CGContextRef )context;

// utility functions
- (float) valueToYCoordinate:(float)value;
- (float) yCoordinateToValue:(float)y;

// for touch event
- (void)proccessForTouch:(UITouch *)touch;
- (void)showIndicatorForIndex:(NSInteger )index;

// standard line 
- (void)setStandardValue:(float)value;
- (void)setLowLimitedValue:(float )value;

@end
